/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */

package com.l2jserver.gameserver.instancemanager;

import java.util.Calendar;
import java.util.logging.Logger;

import com.l2jserver.Config;
import com.l2jserver.gameserver.Announcements;

/**
 * @Auto Saboteador
 */

public class AnuncioEventExp implements Runnable
{
	static Logger _log = Logger.getLogger(AnuncioEventExp.class.getName());
	
	@Override
	public void run()
	{
		
		if ((Calendar.SATURDAY != 0) && (Config.RATE_XP != Config.SATURDAY_RATE_XP) && (Config.RATE_SP != Config.SATURDAY_RATE_SP))
		{
			_log.info("Evento de Exp y Sp Activado: Exp: " + Config.SATURDAY_RATE_XP + " SP " + Config.SATURDAY_RATE_SP);
			Announcements.getInstance().announceToAll("================", true);
			Announcements.getInstance().announceToAll("Evento de Exp y Sp Activado", true);
			Announcements.getInstance().announceToAll("Experiencie: " + Config.SATURDAY_RATE_XP, true);
			Announcements.getInstance().announceToAll("Skill Point: " + Config.SATURDAY_RATE_SP, true);
			Announcements.getInstance().announceToAll("================", true);
		}
	}
	
	public static AnuncioEventExp getInstance()
	{
		return SingletonHolder._instance;
	}
	
	static class SingletonHolder
	{
		protected static final AnuncioEventExp _instance = new AnuncioEventExp();
	}
}